home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 011 / nusq.arc / NUSQ.DOC < prev   
Encoding:
Text File  |  1985-07-18  |  19.1 KB  |  495 lines

  1.  
  2.  
  3.  
  4.  
  5.           NUSQ - File unsqueeze utility
  6.  
  7.           Documentation for CP/M-86 and MS-DOS
  8.      versions 1.11 (CP/M-86), 1.10 & 1.10D (MS-DOS)
  9.          Cliff Sharp   October 21, 1984
  10.  
  11.                DOCUMENTATION TOPICS
  12.  
  13.     OVERVIEW            IN CASE OF TROUBLE
  14.     COMMAND MODE            PROGRAM MESSAGES
  15.     INTERACTIVE MODE        ANNOUNCEMENT
  16.     INSTALLATION             HISTORY
  17.  
  18.  
  19.  
  20.                 OVERVIEW
  21.  
  22.      NUSQ  is  a  utility for expanding squeezed files    to  their
  23. original uncompressed state.   Two separate versions of NUSQ  are
  24. available,  one  for  CP/M-86  and one for the    MS-DOS    operating
  25. system.
  26.  
  27.      NUSQ has two operating modes.  In the command mode, a single
  28. instruction to NUSQ is passed from the command line which invokes
  29. NUSQ.  The command mode requires less effort to use when you have
  30. only  one file to unsqueeze,  or when the names of the files  you
  31. wish  to unsqueeze can all be specified by one    "wildcard"  name.
  32. However,  when    you  have more than one file to unsqueeze  and    a
  33. "wildcard" won't do the job right,  or when the files you want to
  34. unsqueeze are on more than one disk,  the interactive mode allows
  35. you to specify only those files which you want processed, without
  36. reloading the program every time.   In the interactive mode, NUSQ
  37. executes one command, then waits for another.
  38.  
  39.      MS-DOS versions of NUSQ including and subsequent to 1.10 can
  40. use date and time information encoded in files squeezed with NSQ.
  41. This  means  that  a file squeezed with NSQ, 'modemed' to another
  42. location, and unsqueezed with NUSQ  (version  1.10D  or  greater)
  43. will  retain  the date and time of ORIGIN instead of DESTINATION.
  44. NSQ encodes this information at the END of the squeezed file,  so
  45. such files retain compatibility with earlier unsqueeze programs.
  46.  
  47.      See the installation section of this document for details on
  48. how  to  implement this feature in NUSQ.  Any files squeezed with
  49. NSQ (versions 2.01 or higher) will have the  necessary  date  and
  50. time information encoded in them.
  51.  
  52.  
  53.               COMMAND MODE
  54.  
  55.      To unsqueeze only one file, the command mode invocation
  56.  
  57.             A>nusq nerts.aqm
  58.  
  59. will unsqueeze the file NERTS.AQM.  You don't need to specify the
  60. name of the output file (in fact, you can't); the name was stored
  61. within    the file at the time it was squeezed,  and that name will
  62. be  used  to  create  the new file.   (If you  want  to  name  it
  63. differently after you have unsqueezed it,  use the REName command
  64. when NUSQ is finished.)
  65.  
  66.      You  can  unsqueeze all squeezed files on a single  disk  by
  67. issuing the command
  68.  
  69.               A>nusq *.?q?
  70.  
  71. Theoretically at least,  all file squeezers create an output file
  72. whose name is the same as that of the original file,  except that
  73. the  filename extension field is modified by changing the  middle
  74. letter to a "Q".  (If a file has no filetype, a 'QQQ' is appended
  75. for  the file type for the encoded file.   When a file    has  been
  76. renamed  after    being  squeezed,  this    might not  be  the  case;
  77. hopefully,  the  person who renamed it remembered the "Q".)   The
  78. "wildcard" file specification shown above tells NUSQ to unsqueeze
  79. any  file it finds (on the default disk) which has a "Q"  in  the
  80. filename  extension;  that  should  get NUSQ to  unsqueeze  every
  81. squeezed  file on the disk.   NUSQ will display the name of  each
  82. file it finds, and the name of the output file it produces, as it
  83. proceeds:
  84.  
  85.           NERTS.AQM -> NERTS.ASM
  86.           ORGPLOTZ.DQC -> ORGPLOTZ.DOC
  87.  
  88.      Because  NUSQ checks the first two bytes of each input  file
  89. for a valid Squeeze Signature (0FF76 hex), it is possible to say:
  90.  
  91.                 nusq *.*
  92.  
  93. and  get the same results as with "nusq *.?q?".   It  is  faster,
  94. however,  to use the *.?q? method, as that will preclude a lot of
  95. unnecessary file openings.
  96.  
  97.     NUSQ  will also accept more than one filename on the  command
  98. line:
  99.  
  100.           A>nusq nerts.aqm orgplotz.dqc frop.cq
  101.  
  102.      To  use a different disk for output than for input,  end the
  103. command line with just the drive designation. Example:
  104.  
  105.               A>nusq giggle.tqt b:
  106.  
  107. will  write the output file (ostensibly GIGGLE.TXT) on drive  B:.
  108. You will find that NUSQ is very forgiving, as:
  109.  
  110.               A>nusq b: giggle.tqt
  111.  
  112. will accomplish the same thing.  (Note the space between 'b:' and
  113. 'giggle'!)
  114.  
  115.  
  116.  
  117.              INTERACTIVE MODE
  118.  
  119.      Let's  suppose now that you have a large number of  squeezed
  120. files on your disk,  and you only want to unsqueeze some of them.
  121. Unless    you  can specify only those files by using  a  "wildcard"
  122. name,  you'll  probably  find it easier to achieve your  goal  by
  123. using  the interactive mode of NUSQ.   Another instance where  it
  124. would  be easier to use interactive mode is one where  the  files
  125. you wish to unsqueeze are on more than one disk, in more than one
  126. drive.    The command
  127.  
  128.                  A>nusq
  129.  
  130. displays the startup message, then prompts for command input with
  131. an asterisk ("*").
  132.  
  133. NUSQ  Version x.xx
  134. Dave Rand, Paul Homchick and Cliff Sharp  xx/xx/xx
  135. Use: NUSQ afn [afn afn ...] [destination drive:]
  136. *_
  137.  
  138. (The underline shows the cursor position; my name appears only in
  139. the  MS-DOS  version.)     At the asterisk,  you    type  a  filename
  140. ("wildcards"  are allowed here,  too).     NUSQ will unsqueeze  the
  141. file,  then  print  the asterisk prompt again and wait    for  more
  142. commands.   When  you're finished and want to exit NUSQ,  a blank
  143. line or ^C will return you to the operating system.
  144.  
  145.      As  distributed,  NUSQ  won't write over  an  existing  file
  146. without  the user confirming the operation.   Something very like
  147. the following will happen:
  148.  
  149.       A>nusq foo.bqr
  150.  
  151.       nusq: FOO.BQR -> FOO.BAR already exists,
  152.         Overwrite <Y>es, <N>o? overwriting...
  153.  
  154. In this case the user answered "Y" at the question mark, and NUSQ
  155. went  ahead  with the operation.   If "N" is  the  response,  the
  156. unsqueeze  operation is aborted,  and the program goes on to  the
  157. next item in the list (or exits, if the list is empty).
  158.  
  159.  
  160.  
  161.               INSTALLATION
  162.  
  163. Two user-configurable options are provided:  Confirm Before Over-
  164. write, and Select Date Option.
  165.  
  166. As  distributed,  NUSQ    v1.04 will ask    for  confirmation  before
  167. overwriting  a file,  and will use the current date and time when
  168. creating the output file.
  169.  
  170. If  you  would rather have NUSQ write over  existing  files  with
  171. wanton abandon,  without pausing and asking for confirmation, use
  172. DEBUG.COM to patch location 0103H to be 00H instead of 0FFH.   An
  173. example of this patch:
  174.  
  175.           A>debug b:nusq.com
  176.           -e103
  177.           xxxx:0103 FF.00
  178.           -w
  179.           Writing YYYY bytes
  180.           -q
  181.  
  182.           A>
  183.  
  184.  
  185. Select Date Option allows you four choices for the way the output
  186. file is dated.    As distributed, NUSQ will date the output file in
  187. the same manner as most other programs do, i.e. the date and time
  188. shown  in  directory displays will be the date and time at  which
  189. you unsqueezed the file.   You may change this option by changing
  190. the  byte  at  location  0104H (which you can  do  by  using  the
  191. instructions above and the values you will see in a moment, using
  192. the  instructions  shown  above  but  substituting  104  for  103
  193. wherever  103  appears).   Copies of NUSQ patched in this  manner
  194. will display a 'D' after the version number,  signifying that the
  195. input file date option has been enabled, i.e. "1.10D".
  196.  
  197. The available options are:
  198.  
  199.      0) Leave it to DOS
  200.      1) Output file gets the same date/time as the input file
  201.      2) If the squeezed file contains the special date/time
  202.       signature inserted by NSQ at squeeze time, use the
  203.       date/time contained in that signature: otherwise,
  204.       use the current date/time
  205.      3) If the squeezed file contains the special date/time
  206.       signature inserted by NSQ at squeeze time, use the
  207.       date/time contained in that signature: otherwise,
  208.       use the same date/time as the input file
  209.  
  210.  
  211. If you would like the unsqueezed file to retain the same date and
  212. time  shown for the input file (option 1),  patch 0104H  to  0FH. 
  213. For option 2,  patch 0104H to 0F0H;  for option 3, patch 0104H to
  214. 0FFH.
  215.  
  216. Following is a table that trys to explain these options:
  217.  
  218. option   value    use current   use input file    use encoded 
  219.  
  220. 0.        00         yes             -               -
  221. 1.        0F          -             yes              -
  222. 2.        F0          -              -              yes
  223. 3.        FF          -        do this second   try this first
  224.  
  225. There  is  a reason for our distributing NUSQ with the    date/time
  226. options  disabled.   If  you have a backup utility (usually  this
  227. applies  to  a "hard" disk) that uses the file date and  time  to
  228. determine  whether  or    not a file should be  backed  up,  it  is
  229. possible  that    using the input file date could cause loss  of    a
  230. file  by  having  an 'old' date on a 'new'  file,  and    losing    a
  231. backup.  If you are unsure whether this applies to you, leave the
  232. date/time options unchanged until you can find out.
  233.  
  234.  
  235.  
  236.                IN CASE OF TROUBLE
  237.  
  238.      First,  no  matter HOW sure you are that you're doing things
  239. correctly,  try another method of using NUSQ.    If you tried com-
  240. mand mode without luck,  try the interactive mode; if you were in
  241. the interactive mode when it bombed, try command mode.    Make sure
  242. you try at least one command that is just like one shown in  this
  243. document  (but,  of course,  use the name of your file instead of
  244. NERTS or ORGPLOTZ) before you conclude that things are awry.
  245.  
  246.      Occasionally,  for one reason or another,    it's possible  to
  247. get a bad copy of a program or file; transmission errors and disk
  248. errors    have  been  known to cause many problems.   (If  you  can
  249. successfully unsqueeze at least one squeezed file,  you  probably
  250. have  a good copy of the program;  if so,  your copy of the  file
  251. you're  trying to unsqueeze may be the culprit.)  The best way to
  252. tell  if  this is the case is to use a utility like CRCK  on  the
  253. original copy of the offending file/program, and on your copy; if
  254. the numbers you get don't match,  you most likely have a bad copy
  255. of the file/program you checked and should obtain another copy of
  256. it.  (Check the new copy, too, when you get it.)
  257.  
  258.      This  may sound silly,  but do you have the correct  version
  259. for your operating system?  If you try to run the CP/M-86 version
  260. under  MS-DOS,    strange things may happen;  same for  the  MS-DOS
  261. version under CP/M-86.    Also, try using TYPE to actually type the
  262. executable  file  on  your screen;  you'll most  likely  see  the
  263. author's  name.   (See the history later in this document to  see
  264. who wrote what.)
  265.  
  266.      If all that checks out,  the logical next step is to compare
  267. notes  with someone locally to see if anyone else is experiencing
  268. problems.  The system operator ("sysop") of the system from which
  269. you obtained the software can usually be of help if you tell  him
  270. which  version    you're using (CP/M-86 or MS-DOS) and the name  of
  271. the file you're trying unsuccessfully to unsqueeze.  Alternative-
  272. ly,  you  can  leave  a message addressed to  "ALL"  on  a  local
  273. bulletin  board;  usually  some helpful person will jump in  with
  274. suggestions.   Remember, there are no silly questions, only silly
  275. mistakes.
  276.  
  277.      If you've tried all this,  and you're still sure you have    a
  278. problem,  then it's last-resort time.  Contact the author of your
  279. version of the program.   His name,  and a way to contact him, is
  280. in the very beginning of the NUSQ.COM file; TYPE NUSQ.COM and you
  281. should see it.     (If that doesn't work,  use DDT,  SID or DEBUG.)
  282. This  is  by far the slowest method of    resolving  problems,  and
  283. people    who contact program authors with problems caused by oper-
  284. ator error are usually looked upon unfavorably,  so do this  only
  285. if  all  else fails.   Be sure to include the name of the  system
  286. where  you  got your copy of the program,  the name of    the  file
  287. you're trying to unsqueeze and the place where you got the  file,
  288. and  a description of what went wrong.     It might also be nice to
  289. know the names of any people who have tried to help you with your
  290. problem so far.
  291.  
  292.  
  293.  
  294.             PROGRAM MESSAGES
  295.  
  296. Output drive = x:
  297.  
  298.      You  selected a disk drive different from the one containing
  299. the original file for the output file to be created on.
  300.  
  301.  
  302. No file(s) found.
  303.  
  304.      No  files meeting the filename specification you  gave  were
  305. found on the disk you indicated they would be on.  Try reentering
  306. the file specification,  or check to make sure you are specifying
  307. the correct drive and/or disk.     Also,    if you are using wildcard
  308. characters ('*',  '?') in the specification,  make sure the usage
  309. is correct.
  310.  
  311.  
  312. Out of memory. Use more specific filenames.
  313.  
  314.      NUSQ  is operating in a small workspace,  and  the  wildcard
  315. file  specification  you gave has found a large number of  files. 
  316. The  storage  for  all these filenames has  eaten  away  so  much
  317. workspace that NUSQ has no room left in which to unsqueeze any of
  318. the files.   Give NUSQ a filename specification which will find a
  319. smaller  number of files,  so that more unsqueezing workspace  is
  320. available.   (Users  with 96K or more memory will probably  never
  321. see this message.)
  322.  
  323.  
  324. xxxxxxxx.xxx is not a squeezed file.
  325.  
  326.      Squeezed  files  are marked with a  particular  "signature": 
  327. (FF76), NUSQ did not find this signature. Either the beginning of
  328. this file has been damaged,  somebody is being cute and is trying
  329. to invent new "standards", or this file is really not a  squeezed
  330. file.
  331.  
  332.  
  333. xxxxxxxx.xxx already exists,
  334.       Overwrite <Y>es, <N>o?
  335.  
  336.      A    file already exists which has the same name as that given
  337. in  the  squeezed  file for creating  the  output  file.   A  'Y'
  338. response  will cause NUSQ to overwrite the existing file;  a  'N'
  339. answer    will cause NUSQ not to unsqueeze this file.   If you want
  340. to unsqueeze this file without destroying the old, existing file,
  341. rename the existing file before running NUSQ again.
  342.      This  message  will  not  appear if  NUSQ    was  modified  to
  343. overwrite with wanton abandon (see DEBUG instructions preceding).
  344.  
  345.  
  346. Cannot create output file. Aborting.
  347.  
  348.      Either  this disk has so many files on it that there  is  no
  349. room  left  for  a  new directory  entry,  or  (with  MS-DOS  2.x
  350. versions) a subdirectory exists with the same name that NUSQ must
  351. use for the output file.  In any event, you will probably need to
  352. use  a different disk for the output file.   (See  the    preceding
  353. instructions.)
  354.  
  355.  
  356. File has illegal decode size. Aborting.
  357.  
  358.      Something    is  wrong with the input file;    either it is  not
  359. really a squeezed file,  or it has been modified or  damaged,  or
  360. (less  likely) the squeezer which created it did something wrong. 
  361. This file cannot be unsqueezed; try a new copy.
  362.  
  363.  
  364. Close failed...
  365.  
  366.      NUSQ  was unable to close the output file.   This is a  VERY
  367. unlikely  error,  and may mean either that your copy of  NUSQ  is
  368. damaged  or the copy of the operating system currently in  memory
  369. has  been corrupted somehow.   Try booting from a different disk,
  370. or try another copy of NUSQ.  If these fail, contact the author.
  371.  
  372.  
  373. ERROR - Checksums don't match in file xxxxxxxx.xxx
  374.  
  375.      Something is wrong with the input file;  either it has  been
  376. modified or damaged,  or (less likely) the squeezer which created
  377. it  did something wrong.   This file cannot be unsqueezed;  try a
  378. new copy.
  379.  
  380.  
  381. Disk full. Aborting and deleting output file.
  382.  
  383.      The  disk    on  which the output file is  being  written  has
  384. become full; there is no more disk space to contain the remainder
  385. of the file.  Create the output file on a different disk.
  386.  
  387.  
  388. Premature EOF on file... aborted.
  389.  
  390.      NUSQ has not found the special end-of-file (EOF) mark  which
  391. is present in every squeezed file.  Most likely, the last part of
  392. this file is missing.  This file cannot be unsqueezed.
  393.  
  394.  
  395.  
  396.               ANNOUNCEMENT
  397.  
  398.      A look at the signon message in interactive mode will reveal
  399. that NUSQ is the result of committee action.   Said committee was
  400. unable to agree on whether the source code should be  distributed
  401. as  public  domain  code;   consequently,   source  code  is  not
  402. available.
  403.  
  404.  
  405.  
  406.                  HISTORY
  407.  
  408.  
  409.      NUSQ is a file unsqueezer utility written entirely in assem-
  410. bly  language.     The  first file squeezer and unsqueezer  in  the
  411. public domain were written by Richard Greenlaw, in the C program-
  412. ming language.     A Z80 assembly language version was done by Gail
  413. Zacharias  at MIT in the Spring of 1983.   In late '83 Dave  Rand
  414. wrote  an  8080  version,  which went through  several    versions,
  415. culminating  in USQ120.COM.   Paul Homchick assumed the  task  of
  416. converting  Dave's  efforts  to 8086/8088 assembly  language  for
  417. execution  under CP/M-86 in early 1984,  and I    converted  Paul's
  418. version to run under MS-DOS a bit later.
  419.  
  420.  
  421.               CP/M VERSIONS
  422.  
  423.     1.08    January  28,  1984.   First released version
  424.         uploaded to Compuserve.
  425.  
  426.     1.09c    March  24,  1984.   Carriage Return on empty
  427.         line exits program.   Optimized  tree-walker
  428.         adapted  from    MS-DOS    version resulting in
  429.         15%  speed  increase.
  430.  
  431.     1.10    June  22,  1984.   Prior tree-walker was not
  432.         as optimized as we thought.  Further optimi-
  433.         zation borrowed from MS-DOS version, result-
  434.         ing in another 25% increase in speed.
  435.  
  436.     1.11    October 15, 1984.  Version 1.10 introduced a
  437.         bug  that  would  cause   a  'Premature EOF'
  438.         message  to  be  displayed  if  a legitimate
  439.         squeezed  file  used  every byte in the last
  440.         sector.  Now fixed.
  441.  
  442.  
  443.              MS-DOS VERSIONS
  444.  
  445.     1.00M    March 21, 1984.  Original version uploaded to
  446.         Compuserve.  Had  serious bug that  sometimes
  447.         resulted in short files with no warning.
  448.  
  449.     1.01M    March  31,  1984.   Carriage return on    empty
  450.         line at Command prompt ("*"),  now returns to
  451.         DOS  instead of giving another    prompt    line.
  452.         Short File BUG still in this version!
  453.  
  454.     1.02M    April 12,  1984. Fixed Random Block Write DOS
  455.         calls.    Files now unsqueeze to exact  length,
  456.         instead  of  128-byte multiples as  in    prior
  457.         versions.   Buffer  flush code fixed to elim-
  458.         inate short file bug.
  459.  
  460.     1.03 and 1.03D     June 22,  1984.  Decode routines re-
  461.         written  for a 30-percent increase in  speed.
  462.         Version 1.03D uses date and time of the input
  463.         file when creating output file; 1.03 does not
  464.         do so.    This date feature can be user config-
  465.         ured  by changing a byte at offset +4 in  the
  466.         .com  file.   See 'Installation,' above,  for
  467.         details.   Versions prior to this one  always
  468.         appended   a  1A  hex  to  the    end  of   the
  469.         unsqueezed  file.   This CP/M anachronism has
  470.         been removed in this version.
  471.  
  472.     1.04 and 1.04D     September 1, 1984.  Filename parsing
  473.         routine  changed to use MS-DOS "parse"    func-
  474.         tion call.  Prompt "No directory space" which
  475.         used  to appear when a file  create  function
  476.         failed    changed to read "Cannot create output
  477.         file",  because  MS-DOS 2.xx and  later  will
  478.         reject    the create request if a directory  by
  479.         the same name exists.
  480.  
  481.     1.10 and 1.10D     October  21,    1984.    "Bug"  fixed;
  482.         squeezed  files  which    were  100%   utilized
  483.         (i.e.,every last byte had  significant data),
  484.         and  which  were a multiple of 128 in length,
  485.         would  give a "Premature EOF"  error.    Added
  486.         date/time  handling  for  NSQ-created  files. 
  487.         Also  changed  input file handling to  handle
  488.         file lengths more accurately.
  489.  
  490. CP/M and CP/M-86 are trademarks of Digital Research, Inc.
  491. MS (as in MS-DOS) is a trademark of Microsoft, Inc.
  492.  
  493.  
  494. Press <CR> to continue: -86 are trademarks of Digital Research, Inc.
  495. MS (as